<?php

namespace component\event\chkupgrade;

use app\bll\ComponentElement as BllComponentElement;
use app\bll\ComponentExtend as BllComponentExtend;
use app\bll\ComponentEvent as BllComponentEvent;
use app\bll\Plugin as BllPlugin;
use app\bll\ComponentWidget as BllComponentWidget;
use app\bll\Frame as BllFrame;

class Index
{
    public function index($param = [])
    {
        $this->chkFrame();
        $this->chkElement();
        $this->chkEvent();
        $this->chkExtend();
        $this->chkPlugin();
        $this->chkWidget();
    }

    /**
     * 检查框架
     *
     * @return void
     */
    private function chkFrame()
    {
        $bllFrame = new BllFrame();
        $bllFrame->checkUpgrade();
    }


    /**
     * 检查元素
     *
     * @return void
     */
    private function chkElement()
    {
        $bllComponentElement = new BllComponentElement();
        $bllComponentElement->checkAllUpgrade();
    }

    /**
     * 检查事件
     *
     * @return void
     */
    private function chkEvent()
    {
        $bllComponentEvent = new BllComponentEvent();
        $bllComponentEvent->checkAllUpgrade();
    }

    /**
     * 检查扩展
     *
     * @return void
     */
    private function chkExtend()
    {

        $bllComponentExtend = new BllComponentExtend();
        $bllComponentExtend->checkAllUpgrade();
    }

    /**
     * 检查挂件
     *
     * @return void
     */
    private function chkWidget()
    {
        $bllComponentWidget = new BllComponentWidget();
        $bllComponentWidget->checkAllUpgrade();
    }

    private function chkPlugin()
    {
        $bllPlugin = new BllPlugin();
        $bllPlugin->checkAllUpgrade();
    }
}
